<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<?php
	include "../../connect.php";		
$strSQL = "SELECT l.*,g.GioBatDau,g.GioKetThuc,p.ThanhTien FROM phieudatsan p INNER JOIN lichdatsan l
		   on p.PhieuDatSanID=l.PhieuDatSanID,giohoatdong g
		   where p.PhieuDatSanID='$maphieu' and g.GioHoatDongID=l.GioHoatDongID";
//echo $strSQL;
$result = mysql_query($strSQL);
$n=mysql_num_rows($result);
if($n>0)
{
?>
	  <div style="max-height:700px; overflow:auto;">
			<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
				<tr>
					<th class="table-header-repeat line-left"  width="50px"><a href="">STT</a>	</th>
					<th class="table-header-repeat line-left"  width="210px"><a href="">Ngày/Tuần</a></th>
					<th class="table-header-repeat line-left"  width="210px"><a href="">Ngày Bắt Đầu</a></th>
                    <th class="table-header-repeat line-left"  width="210px"><a href="">Ngày Kết Thúc</a></th>
                    <th class="table-header-repeat line-left"  width="210px"><a href="">Giờ Bắt Đầu</a></th>
                    <th class="table-header-repeat line-left" width="180px"><a href="">Giờ Kết Thúc</a></th>
                    <th class="table-header-repeat line-left" width="50px"><a href="">Hai</a></th>
                    <th class="table-header-repeat line-left" width="50px"><a href="">Ba</a></th>
                    <th class="table-header-repeat line-left" width="50px"><a href="">Tư</a></th>
                    <th class="table-header-repeat line-left" width="50px"><a href="">Năm</a></th>
                    <th class="table-header-repeat line-left" width="50px"><a href="">Sáu</a></th>
                    <th class="table-header-repeat line-left" width="50px"><a href="">Bảy</a></th>
                    <th class="table-header-repeat line-left" width="50px"><a href="">CN</a></th>
                   
				</tr>
                
 <?php
 $i=$start;
while($r3 = mysql_fetch_assoc($result))
{
	$i++;
	$phieudatsanid=$r3["PhieuDatSanID"];
	$thanhtien=$r3["ThanhTien"]	;
	$lichdatsanid=$r3["LichDatSanID"];
	$songaycuatuan=$r3["SoNgayCuaTuan"];
	$ngaybd=$r3["NgayBD"];
	$ngaykt=$r3["NgayKT"];
	$giobatdau=$r3["GioBatDau"];
	$gioketthuc=$r3["GioKetThuc"];
	$hai=$r3["Hai"];$ba=$r3["Ba"];$tu=$r3["Tu"];$nam=$r3["Nam"];$sau=$r3["Sau"];$bay=$r3["Bay"];$cn=$r3["ChuNhat"];
	
			?>
             <!--  -->
					<td width="50px"><?php echo "$i"; ?></td>
                    <td width="210px"><?php echo "$songaycuatuan"; ?></td>
					<td width="210px"><?php echo "$ngaybd"; ?></td>
                    <td width="210px"><?php echo "$ngaykt"; ?></td>
                    <td width="210px"><?php echo "$giobatdau"; ?></td>
                    <td width="180px"><?php echo "$gioketthuc"; ?></td>
                    <td width="50px"><?php echo "$hai"; ?></td>
                    <td width="50px"><?php echo "$ba"; ?></td>
                    <td width="50px"><?php echo "$tu"; ?></td>
                    <td width="50px"><?php echo "$nam"; ?></td>
                    <td width="50px"><?php echo "$sau"; ?></td>
                    <td width="50px"><?php echo "$bay"; ?></td>
                    <td width="50px"><?php echo "$cn"; ?></td>
                   
				</tr>
   <?php 
   			}
    ?> 
    </table>
   </div>
   <table id="tongtien">
  	<tr>
    <td colspan="5">Thành Tiền :</td>
    <td><?php echo "$thanhtien"; ?> VNĐ</td>
    </tr>
  </table>
 <?php
}
else
	{
		echo "Không Có";
	}
?>